<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="./node_modules/axios/dist/axios.js"></script>
</head>
<body>
</body>
<script type="module">
    // 作业：完成取消拦截。
    import axios from "./index.js";
    axios.interceptors.request.use(function(config){
		console.log("请求拦截成功1");
		return config;
    },function(){
		console.log("请求拦截失败1")
    })
	axios.interceptors.request.use(function(config){
		console.log("请求拦截成功2");
		return config;
	},function(){
		console.log("请求拦截失败2")
	})

    axios.interceptors.response.use(function(res){
		console.log("响应拦截成功1")
        return res;
    },function(){
		console.log("响应拦截失败1")
    })
	axios.interceptors.response.use(function(res){
		console.log("响应拦截成功2")
        return res.data;
	},function(){
		console.log("响应拦截失败2")
	})
    axios("http://zhangpeiyue.com/scoreList").then(value=>{
		console.log(value);
    })
</script>
</html>